#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <assert.h>

size_t my_strlen1(const char* p)
{
	assert(p != NULL);
	size_t count = 0;
	while (*p)
	{
		p++;
		count++;
	}
	return count;
}

size_t my_strlen2(const char* p)
{
	assert(p != NULL);
	const char* s = p;
	while (*p)
	{
		p++;
	}
	return p - s;
}

size_t my_strlen3(const char* p)
{
	assert(p != NULL);
	if (*p == '\0')
	{
		return 0;
	}
	else
	{
		return 1 + my_strlen3(p + 1);
	}
}

int main()
{
	char arr[] = "hello bit.";
	size_t ret1 = my_strlen1(arr);
	size_t ret2 = my_strlen2(arr);
	size_t ret3 = my_strlen3(arr);
	printf("%zd\n%zd\n%zd\n", ret1,ret2,ret3);
	return 0;
}